//热部署启动服务入口 node server.js
var webpack = require('webpack')
var WebpackDevServer = require('webpack-dev-server')
var config = require('./webpack.config.server')

var path = require('path')
var node_modules_dir = path.resolve(__dirname, 'node_modules')
new WebpackDevServer(webpack(config), {
    publicPath: config.output.publicPath,
    hot: true,
    noInfo: false,
    historyApiFallback: true,
    proxy: {
        '/api/': {
            // target: 'http://106.14.116.54:8080',
            target: 'http://10.90.3.124:8080',
        }
    }
}).listen(3000, '127.0.0.1', function (err, result) {
    if (err) {
        console.log(err)
    }
    console.log(node_modules_dir)
})